package Server;

import org.mortbay.jetty.Server;
import org.mortbay.jetty.webapp.WebAppContext;
/**
 * Class implements Runnable - for using thread to open clever Drop Box web
 * @author Guy && Liel
 *
 */
public class StartWeb implements Runnable
{
	Server server;
	/**
	 * Constructor of StartWeb
	 */
	public StartWeb() {
		super();
		this.server =new Server(8880);
	}
	/**
	 * implement run of runnable for create connection to Web 
	 */
	@Override
	public void run() 
	{
		
		WebAppContext wap=new WebAppContext();
		wap.setServer(server);
		wap.setContextPath("/");
//		wap.setWar("C:\\Documents and Settings\\liel\\Desktop\\Jars\\WebContent");
		wap.setWar("C:\\ourDropBox\\WebContent");

		server.setHandler(wap);
		
		try 
		{
			server.start();
			server.join();
		} 
		catch (Exception e) 
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
	}

}
